package com.sai.jsai.module.system.dal.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.sai.jsai.module.system.dal.entity.SysUser;
import com.sai.jsai.common.starter.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author jisai
 * @version 0.0.1
 * @Description 系统用户数据层
 * @createTime 2024/09/24
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    default SysUser selectByUsername(String username) {
        return selectOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, username));
    }

}
